﻿@{
    var model = Model["list"];
}
<div id="pager" class="pager">
    <div class="info_pg">共@(model.TotalItems)条</div>
    <div class="list_pg">
        <a href="@Html.PageUrl(1)" class="first">首页</a>
        @if (model.HasPreviousPage && model.TotalItems > 0) {
            <a href="@Html.PageUrl((int)model.PreviousPageIndex)" class="prev">上一页</a>
        } else {
            <a class="prev none">上一页</a>
        }
        @foreach (int i in model.PageArray) {
            if (@i == model.CurrentPageIndex) {
            <a class="current">@i</a>
            } else if (@i == 0) {
            <a class="more">…</a>
            } else {
            <a href="@Html.PageUrl(i)">@i</a>
            }
        }
        @if (model.HasNextPage && model.TotalItems > 0) {
            <a class="next" href="@Html.PageUrl((int)model.NextPageIndex)">下一页</a>
        } else {
            <a class="next none">下一页</a>
        }
        <a class="last" href="@Html.PageUrl((int)model.TotalPages)">尾页</a>
        <!-- <span class="msg">跳转</span>
            <input class="text" type="text" value="">
            <span class="msg">页</span>-->
    </div>
</div>
